namespace Mytodotodaylist.Core.Entites
{
    using System;

    public class Event
    {
        public Event()
        {
            Periodicity = Periodicity.EveryDay;
        }

        public string Name { get; set; }
        public DateTime Date { get; set; }
        public Periodicity Periodicity { get; set; }

        public override bool Equals(object obj)
        {
            if (!(obj is Event))
                return false;
            
            var parEv = (Event)obj;

            return 
                parEv.Name.Equals(Name) && 
                parEv.Date.Equals(Date) &&
                parEv.Periodicity.Equals(Periodicity);
        }
    }

    public enum Periodicity
    {
        None,
        OnDate,
        EveryDay,
        Scheduled
    }
}